package threaddemo;

class Singleton {
    private static Singleton instance = new Singleton();

    public static Singleton getINsingleton() {
        return instance;
    }

    private Singleton() {}
}
class Singletonlazy {
    private static volatile Singletonlazy instance = null;

    public static Singletonlazy getInstance() {
        if (instance == null) {
            synchronized (Singleton.class) {
                if (instance == null) {
                    instance = new Singletonlazy();
                }
            }
        }
        return instance;
    }

    private Singletonlazy() {}
}
public class demo9_0513 {
}
